package by.amakarevich.webapp.page.home;

import javax.inject.Inject;

import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.request.Url;
import org.apache.wicket.request.resource.UrlResourceReference;

import by.amakarevich.services.KitService;
import by.amakarevich.webapp.page.BaseLayout;

public class HomePage extends BaseLayout {
	
	@Inject
	private KitService kitService;
	
	@Override
	protected void onInitialize() {
		super.onInitialize();


		WebMarkupContainer liContainer = new WebMarkupContainer("wr-li");
		add(liContainer);


		String urlStr="http://localhost:8081/imagesService/0.jpg";
		final UrlResourceReference url= new UrlResourceReference(Url.parse(urlStr));
		liContainer.add(new Image("img", url));

	}
	
    @Override
    protected IModel<String> getPageTitle() {
        return new ResourceModel("p.home.title");
    }

}
